$("tbody").on("click", ".btn-danger", function() {
  let id = $(this)
    .parents("tr")
    .attr("data-id");
  //   $.get("/delete_user_by_id", { id: id }, function(res) {
  //     console.log(res);
  //   });
  let del = $(this).parents("tr");
  let isDelete = confirm("您确定要删除吗?");
  console.log(isDelete);
  if (isDelete) {
    $.ajax({
      type: "get",
      url: "/delete_user_by_id",
      data: { id: id },
      success(res) {
        console.log(res);
        del.remove();
        alert("删除成功");
      }
    });
  }
});
